<template>
  <div class="active-desc">
    <img class="icon-gift" :src="require('@/assets/home-h5-img/2x/礼盒@2x.png')" @click="handleClick" />
    <span>限时免费试用</span>
    <span class="num color-primary">30</span>
    <span>天！享最低</span>
    <span class="num color-primary">8</span>
    <span>折优惠券！</span>
  </div>
</template>

<script>
export default {
  methods: {
    handleClick() {
      this.$emit('click-gift');
    }
  }
};
</script>

<style lang="postcss" scoped>
@keyframes move {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

.icon-gift {
  cursor: pointer;
  width: 24px;
  height: 24px;
  margin-top: -4px;
  margin-right: 6px;
  animation: move 1000ms ease-in-out;
  animation-iteration-count: infinite;
}

.active-desc {
  position: relative;
  display: flex;
  align-items: center;
  height: 38px;
  line-height: 38px;
  margin-top: 32px;
  margin-bottom: 20px;
}

.num {
  font-weight: bold;
  font-size: 16px;
  line-height: 20px;
  margin: 0 3px;
  color: #f95f01;
}
</style>
